<?php
require_once 'SendMsg.php';
class Factory
{
    //发送短信，根据type调用不同的短信接口方
    public static function createSend(string $type):SendMsg
    {
        $product=null;
        switch ($type){
            case "aliyun":
                $product=new Aliyun();
                $product->send();
                break;
            case "baidu":
                $product=new Baidu();
                $product->send();
        }
        return $product;
    }

}